package com.istock.base;

import java.util.Scanner;

import org.springframework.shell.standard.ShellComponent;
import org.springframework.shell.standard.ShellMethod;

import lombok.extern.slf4j.Slf4j;

@ShellComponent
@Slf4j
public class Lancher {

	@ShellMethod("say hello")
    public void hello() {
		System.out.print("input the name:");
		Scanner scanner = new Scanner( System.in );
		String name = scanner.next();
		//TODO 不能关闭,否则springShell会出现死循环
//		scanner.close();
        log.info("hello, " + name + "!");
    }
	
}
